package com.quyeying.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quyeying.entity.TblPopularizeVideoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quyeying.utils.result.R;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 推广视频表 Mapper 接口
 * </p>
 *
 * @author skx
 * @since 2022-10-20
 */
public interface TblPopularizeVideoDao extends BaseMapper<TblPopularizeVideoEntity> {

    /**
     * 获取最新商品视频分页接口
     */
    Page<Map<String, Object>> newVideos(Page<Map<String, Object>> page, @Param("vid") Long vid, @Param("coverSuffix") String coverSuffix);

    Page<Map<String, Object>> findByVideoMaps(Page<Map<String, Object>> page, @Param("coverSuffix") String coverSuffix, @Param("merchantId") Long merchantId, @Param("end") String end);

    Map<String, Object> findByVideoId(@Param("coverSuffix") String coverSuffix, @Param("videoId") Long videoId);

    List<Map<String, Object>> randomVideoList(String coverSuffix);
}
